﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Active.Core.State;
using Active.Core;

public partial class BalanceTable : System.Web.UI.Page
{
    //private Bill _CurrentBill = null;
    ///// <summary>
    ///// 当前清单
    ///// </summary>
    //protected Bill CurrentBill
    //{
    //    get
    //    {
    //        if (_CurrentBill == null)
    //        {
    //            if (Request.QueryString["BillId"] != null && Request.QueryString["BillId"].Length > 0)
    //            {
    //                _CurrentBill = Bill.Load(Convert.ToInt32(Request.QueryString["BillId"]));
    //            }
    //            else
    //            {
    //                _CurrentBill = Bill.Load(0);
    //            }
    //        }
    //        return _CurrentBill;
    //    }
    //}

    //protected void Page_Load(object sender, EventArgs e)
    //{
    //    CurrentBillState.Bill = blb.CurrentBill = CurrentBill;
    //}

    //protected void btnSubmitMediaManagerAudit_Click(object sender, EventArgs e)
    //{
    //    CurrentBill.ConfirmByMediaManager();
    //}

    //protected void btnCancelMediaManagerAudit_Click(object sender, EventArgs e)
    //{
    //    CurrentBill.ReturnToMediaManager();
    //    Response.Redirect("~/bill", true);
    //}

    //protected void SubmitGeneralManagerAuditButton_Click(object sender, EventArgs e)
    //{
    //    CurrentBill.ConfirmByGeneralManager();
    //}

    //protected void CancelGeneralManagerAuditButton_Click(object sender, EventArgs e)
    //{
    //    //CurrentBill.SetGeneralManagerAudit(Audit.Working);
    //    //CurrentBill.Save();
    //}

    //protected override void OnPreRender(EventArgs e)
    //{
    //    base.OnPreRender(e);

    //    this.MediaManagerAuditFieldset.Visible = false;
    //    this.btnSubmitMediaManagerAudit.Visible = false;
    //    this.btnCancelMediaManagerAudit.Visible = false;

    //    this.GeneralManagerAuditFieldset.Visible = false;
    //    this.SubmitGeneralManagerAuditButton.Visible = false;

    //    if (CurrentBill.StateValue == BillStateValue.MediaManagerWorking)
    //    {
    //        this.MediaManagerAuditFieldset.Visible = true;
    //        this.btnSubmitMediaManagerAudit.Visible = true;
    //    }
    //    if (CurrentBill.StateValue == BillStateValue.GeneralManagerWorking)
    //    {
    //        this.btnCancelMediaManagerAudit.Visible = true;
    //        this.GeneralManagerAuditFieldset.Visible = true;
    //        this.SubmitGeneralManagerAuditButton.Visible = true;
    //    }
    //    if (CurrentBill.StateValue == BillStateValue.FinanceWorking)
    //    {
    //        this.GeneralManagerAuditFieldset.Visible = true;
    //        this.btnCancelMediaManagerAudit.Visible = true;
    //    }
    //    if (!Utils.IsMediaManager)
    //    {
    //        this.MediaManagerAuditFieldset.Visible = false;
    //    }
    //    if (!Utils.IsGeneralManager)
    //    {
    //        this.GeneralManagerAuditFieldset.Visible = false;
    //    }
    //}
}
